home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15730 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: mail2news.demon.co.uk!tsys.demon.co.uk
  2. From: Tom Wheeley <tomw@tsys.demon.co.uk>
  3. Newsgroups: comp.lang.c++,comp.lang.c
  4. Subject: Re: HELP: no mapping at the fault address
  5. Date: Sun, 07 Apr 96 02:20:49 GMT
  6. Organization: City Zen FM
  7. Message-ID: <828843649snz@tsys.demon.co.uk>
  8. References: <opybocswab.fsf@sweetbay.will.uiuc.edu> <4k3qn8$1gk6@msunews.cl.msu.edu> <828829661snz@genesis.demon.co.uk>
  9. Reply-To: tomw@tsys.demon.co.uk
  10. X-NNTP-Posting-Host: tsys.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.30
  12. X-Sig-By: Tomsystems Quote v1.2.  (c)1996 Tom Wheeley, tomw@tsys.demon.co.uk
  13. X-Mail2News-Path: tsys.demon.co.uk
  14.  
  15. In article <828829661snz@genesis.demon.co.uk>
  16.            fred@genesis.demon.co.uk "Lawrence Kirby" writes:
  17.  
  18. > In article <4k3qn8$1gk6@msunews.cl.msu.edu>
  19. >            jliu@perm.fw.msu.edu "Jianguo Liu" writes:
  20. > >Hello, everyone:
  21. > >
  22. > >I had an error when running a program in SPARCcompiler C++ 
  23. > >4.0.1 (Solaris 2.4). The error was deteced using dbx. The 
  24. > >message was
  25. > >
  26. > >**********************************
  27. > >
  28. > >signal SEGV (no mapping at the fault address) in t-splay at 
  29. > >0xef6bc470. 
  30. > >
  31. > >The current line is 
  32. > >
  33. > >new_ptr=(strucut tree *) malloc(sizeof(struct tree));
  34. > Did you include stdlib.h? You must ensure that all functions that don't
  35. > return int or are variadic are declared (it is best that all functions are
  36. > declared). If that isn't the problem your program probably corrupted the
  37.  
  38. Would I be right in saying that if he had omitted the cast for the return
  39. value of malloc() then this error would have arisen as a warning in an
  40. ISO compiler?  With (void *) being `equivalent' to any old pointer etc.
  41.  
  42. .splitbung
  43. -- 
  44. * TQ 1.0 * The 'Just So Quotes'.
  45. "If we do not succeed, then we face the risk of failure."
  46.         -- Dan Quayle, Vice-President of the United States
  47.